package com.example.demo.configuration;

import com.example.demo.security.provider.CustomUsernamePasswordAuthenticationProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.ProviderManager;

/**
 * describe:
 *
 * @author lianying
 * @date 2020/12/06
 */
@Configuration
public class SecurityConfig {
    @Autowired
    private CustomUsernamePasswordAuthenticationProvider customUsernamePasswordAuthenticationProvider;

    @Bean
    public ProviderManager providerManager(){
        ProviderManager providerManager=new ProviderManager(customUsernamePasswordAuthenticationProvider);
        return providerManager;
    }
}
